<?php

namespace App\Models;

class RedpacketBase extends Model
{
    protected $table = 'yf_redpacket_base';
    protected $primaryKey = 'redpacket_id';
    public $timestamps = false;
    protected $guarded = ['redpacket_id'];

    public static function getRedpacketTIdsByUserIdAsArray(int $userId) : array
    {
        return self::whereRedpacketOwnerId($userId)->pluck('redpacket_t_id')->toArray();
    }
}
